const express = require('express')

// 导入路由模块
const router = require('./router')

const app = express()

// 解析json格式数据，json解析中间件
app.use(express.json())

// 解析表单
app.use(express.urlencoded({extends: false}))



// 注册路由模块
// app.use(router)
// 添加统一前缀
app.use('/api', router)


app.listen(80, () => {
    console.log('express server running: http://127.0.0.1')
    
})






